#include <iostream>
using namespace std;
int main()
{
    cout<<"Hello,c++";
    return 0;
}




#include <iostream>
using namespace std;
int main()
{
    cout <<"I have" << 3.5 <<"dollace." << endl;
    cout <<"I want to buy:" << endl <<"a book.";
    return 0;
}








#include <iostream>
using namespace std;
int main()
{
    int a,b,c;
    cout <<"Please input two numbers:" << endl;
    cin >> a >> b;
    c = a + b;
    cout <<"The sum is"<< c <<"!";
    return 0;
}






#include <iostream>
using namespace std;
int main()
{
    int n1 = 1378;
    short n2;
    char c = 'a';
    double d1 = 7.089;
    double d2;
    n2 = c;
    cout <<"c = "<< c <<", n2 = "<< n2 <<endl;
    c = n1;
    cout <<"c = " << c <<",n1 = " << n1 << end1;
    ni = d1;
    cout <<"n1 ="<< n1 << endl;
    d2 = n1;
    cout << d2 << endl;
    return 0;
}











#include <iostream>
using namespace std;
int main()
{
    int m,n;
    bool b1 = true, b2 = false;
    m = b1;
    n = b2;
    cout << m <<"," << n << endl;
    return 0;
} 








#include <iostream>
using namespace std;
int main()
{
    int a,b = 100;
    unsigned int c;
    a = 0xffffffff;
    b = 0xffffffff;
    cout << a << "," << c - b << endl;
    return 0;

}











#include <iostream>
using namespace std;
int main()
{
    int a = 10;
    int b = 3;
    double d = a/b;
    cout << d << endl;
    d = 5/2;
    cout << d << endl;
    d = 5/2.0;
    cout << d << endl;
    d = (double)a/b;
    cout << d << endl;
    return 0;
}












#include <iostream>
using namespace std;
int main()
{
    int n1 , n2 = 5;
    n2 ++;
    ++ n2;
    n1 = n2 ++;
    cout << n1 << "," << n2 <<endl;
    n1 = ++ n2;
    cout << n1 << "," << n1 << endl;
    return 0;
}









#include <iostream>
using namespace std;
int main()
{
    int n1 = 4, n2 = 5,n3;
    n3 = (n1 > n2);
    cout << n3 << ",";
    n3 = (n1 < n2);
    cout << n3 << ",";
    n3 = (n1 == 4);
    cout << n3 << ",";
    n3 = (n1 != 4);
    cout << n3 <<",";
    n3 = (n1 == 5);
    cout << n3;
    return 0;
}








#include <iostream>
using namespace std;
int main()
{
    int a = 0, b = 1;
    bool n = a ++&& b ++;
    cout << a <<"," << b << endl;
    n = a ++&& b ++;
    cout << a <<"," << b << endl;
    n = a ++|| b ++;
    cout << a << "," << b << endl;
    return 0;
}








#include <iostream>
using namespace std;
int main()
{
    int a = ~21;
    unsigned b = ~21;
    cout << a << "," << b << "," << hex << a << "," << b;
    return 0;
}








#include <iostream>
using namespace std;
int main()
{
    int n1 = 15;
    short n2 = 15;
    unsigned short n3 = 15;
    n1 <<== 15;
    cout << "n1 =" << hex << n1 << dec << endl;
    n2 <<== 15;
    n3 <<== 15;
    cout << "n2" << n2 << ", n3 =" << n3 << endl;
    unsigned char c = 7;
    cout << "c << 4 =" << (c << 4) << endl;
    c <<== 4;
    cout << "c =" << c;
    return 0;

}









#include <iostream>
using namespace std;
int main()
{
    int a = 4;
    int b = 5;
    int c = a > b ? a:b;
    cout << c << endl;
    c = a < b ? a:b;
    cout << c << endl;
    c = 3 < 5 ? ++a:++b;
    cout << a << "," << b << "," << c << endl;
    b = 8;
    c = 3 > 5 ? ++a:++b;
    cout << a << "," << b << "," << c << endl;
    return 0;
}